var e = require("../../../utils/function.js"), a = require("../../../api.js"), n = getApp();

Page({
    data: {
        price: "",
        banknum: "",
        bankname: "",
        pricey: wx.getStorageSync("price")
    },
    intoPageHandler: function(t) {
        console.log("提现申请参数", t);
        var o = this;
        n.request({
            url: a.user.apply,
            method: "post",
            data: {
                price: o.data.price,
                bcard_num: o.data.banknum,
                bankname: o.data.bankname,
                type: 2
            },
            success: function(a) {
                console.log("提现申请结果", a), 1 == a.code ? e.intoPageHandler(t.currentTarget.dataset.skip) : wx.showToast({
                    title: a.msg,
                    icon: "none",
                    duration: 1e3
                });
            }
        });
    },
    getprice: function(e) {
        console.log("获取提现金额", e), this.setData({
            price: e.detail.value
        });
    },
    getbanknum: function(e) {
        console.log("获取提现金额", e), this.setData({
            banknum: e.detail.value
        });
    },
    getbankname: function(e) {
        console.log("获取提现金额", e), this.setData({
            bankname: e.detail.value
        });
    },
    onLoad: function(e) {
        e.uid && n.shareCouponsMessage(e.uid);
    },
    onReady: function() {},
    onShow: function() {},
    onHide: function() {},
    onUnload: function() {},
    onPullDownRefresh: function() {},
    onReachBottom: function() {},
    onShareAppMessage: function() {
        var e = n.shareAppMessage().title, a = n.shareAppMessage().imageUrl, t = n.shareAppMessage().desc, o = n.shareAppMessage().path;
        return console.log(n.shareAppMessage()), {
            title: e,
            imageUrl: a,
            desc: t,
            path: o
        };
    }
});